.ProsemirrorEditor.fullscreen {
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  z-index: 9998;

  .ProseMirror-menubar-wrapper {
    height:100%;
  }

  .ProseMirror {
    position:static;
    overflow:auto;
    heigh: 100%;
    height: ~"calc(100% - 26px)";
    height: ~"-o-calc(100% - 26px)"; /* opera */
    height: ~"-webkit-calc(100% - 26px)"; /* google, safari */
  }

  .ProseMirror-menubar {
    position:static !important;
    top:0 !important;
    left:0 !important;
    margin:0 !important;
    width:100% !important;
  }
}

/**
 * Menu defaults
 */
.ProsemirrorEditor {
  .ProseMirror-menu {
    margin: 0 -4px;
    line-height: 1;
  }

  .ProseMirror-tooltip .ProseMirror-menu {
    width: -webkit-fit-content;
    width: fit-content;
    white-space: pre;
  }

  .ProseMirror-menuitem {
    margin-right: 0;
    display: inline-block;
  }

  .ProseMirror-menuseparator {
    border-right: 1px solid #ddd;
    margin-right: 3px;
  }

  .ProseMirror-menuitem {
    .ProseMirror-menu-group {
      border-right: 1px solid #ddd;
    }

    .ProseMirror-menu-group.last {
      border-right: none;
    }

    .seperator {
      border-right: 1px solid #ddd;
      margin-right: 2px;
      padding-right: 2px;
    }
  }

  .ProseMirror-menu-dropdown, .ProseMirror-menu-dropdown-menu {
    font-size: 90%;
    white-space: nowrap;
  }

  .ProseMirror-menu-dropdown {
    cursor: pointer;
    position: relative;
    padding-right: 15px !important;
  }

  .ProseMirror-menu-dropdown-wrap {
    padding: 1px 0 1px 0;
    display: inline-block;
    position: relative;
  }

  .ProseMirror-menu-dropdown-right {
    right: 0;
  }

  .ProseMirror-menu-dropdown:after {
    content: "";
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    opacity: .6;
    position: absolute;
    right: 4px;
    top: calc(50% - 2px);
  }

  .ProseMirror-menu-submenu {
    border-top-right-radius: 4px;
  }

  .ProseMirror-menu-dropdown-menu, .ProseMirror-menu-submenu {
    position: absolute;
    background: white;
    color: #666;
    border: 1px solid #aaa;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
  }

  .ProseMirror-menu-dropdown-menu {
    z-index: 15;
    min-width: 6em;
    margin-top: 2px;
  }

  .ProseMirror-menu-dropdown-item {
    cursor: pointer;
  }

  .ProseMirror-menu-dropdown-item div[title], .ProseMirror-menu-submenu-wrap {
    padding: 4px;
  }

  .ProseMirror-menu-dropdown-item:hover {
    background: #f2f2f2;
  }

  .ProseMirror-menu-submenu-wrap {
    position: relative;
  }

  .ProseMirror-menu-submenu-label:after {
    content: "";
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 4px solid currentColor;
    opacity: .6;
    position: absolute;
    right: 4px;
    top: calc(50% - 4px);
  }

  .ProseMirror-menu-submenu {
    display: none;
    min-width: 4em;
    left: 100%;
    top: 0;
  }

  .ProseMirror-menu-active {
    background: #eee;
    border-radius: 4px;
    border: 1px solid @background-color-page !important;
  }

  .ProseMirror-menu-disabled {
    opacity: .3;
  }

  .ProseMirror-menu-submenu-wrap:hover .ProseMirror-menu-submenu, .ProseMirror-menu-submenu-wrap-active .ProseMirror-menu-submenu {
    display: block;
  }

  .ProseMirror-icon {
    display: inline-block;
    line-height: .8;
    vertical-align: -2px; /* Compensate for padding */
    padding: 1px 7px;
    cursor: pointer;
    border: 1px solid transparent;
  }

  .ProseMirror-menu-disabled.ProseMirror-icon {
    cursor: default;
  }

  .ProseMirror-icon svg {
    fill: currentColor;
    height: 1em;
  }

  .ProseMirror-icon span {
    vertical-align: text-top;
  }

}

/**
 * Static plain editor style
 */
.ProsemirrorEditor.plainMenu {
  .ProseMirror {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-top-width: 1px !important;
  }

  .ProseMirror-textblock-dropdown {
    min-width: 3em;
  }

  .ProseMirror-menubar {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border:1px solid #ddd;
    position: relative;
    min-height: 1em;
    color: #666;
    padding: 1px 6px;
    top: 0; left: 0; right: 0;
    background: white;
    z-index: 10;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    overflow: visible;
  }
}

/**
 * Editor style attached at the top of input only visible on focus
 */
.ProsemirrorEditor.focusMenu {

  .form-control:focus {
    border-top-left-radius: 0 !important;
  }

  .ProseMirror-menubar {
    display: table;
    min-height: 1em;
    color: #666;
    padding: 2px 6px;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    overflow: visible;
    margin-top: -26px;
    background: white;
    border: 1px solid @background3;
    border-bottom: 0;
    border-top:2px solid @background3;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    float: left;

  }

  @-moz-document url-prefix() {
    .ProseMirror-menubar {
      margin-top: -27px;
    }
  }
}

.ProsemirrorEditor {

  .ProseMirror {
    position: relative;
    word-wrap: break-word;
    white-space: pre-wrap;
    -webkit-font-variant-ligatures: none;
    font-variant-ligatures: none;
  }

  .ProseMirror ul, .ProseMirror ol {
    cursor: default;
  }

  .ProseMirror pre {
    white-space: pre-wrap;
  }

  .ProseMirror li {
    position: relative;
  }

  .ProseMirror img {
    max-width: 100%;
  }

  .ProseMirror-hideselection *::selection {
    background: transparent;
  }
  .ProseMirror-hideselection *::-moz-selection {
    background: transparent;
  }

  .ProseMirror-selectednode {
    outline: 2px solid #8cf;
  }

  /* Make sure li selections wrap around markers */
  li.ProseMirror-selectednode {
    outline: none;
  }

  li.ProseMirror-selectednode:after {
    content: "";
    position: absolute;
    left: -32px;
    right: -2px;
    top: -2px;
    bottom: -2px;
    border: 2px solid #8cf;
    pointer-events: none;
  }

  .ProseMirror-textblock-dropdown {
    min-width: 3em;
  }

  .ProseMirror-menu {
    margin: 0 -4px;
    line-height: 1;
  }

  .ProseMirror-tooltip .ProseMirror-menu {
    width: -webkit-fit-content;
    width: fit-content;
    white-space: pre;
  }

  .ProseMirror-gapcursor {
    display: none;
    pointer-events: none;
    position: absolute;
  }

  .ProseMirror-gapcursor:after {
    content: "";
    display: block;
    position: absolute;
    top: -2px;
    width: 20px;
    border-top: 1px solid black;
    animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
  }

  @keyframes ProseMirror-cursor-blink {
    to {
      visibility: hidden;
    }
  }

  .ProseMirror-focused .ProseMirror-gapcursor {
    display: block;
  }
  /* Add space around the hr to make clicking it easier */

  .ProseMirror-example-setup-style hr {
    padding: 2px 10px;
    border: none;
    margin: 1em 0;
  }

  .ProseMirror-example-setup-style hr:after {
    content: "";
    display: block;
    height: 1px;
    background-color: silver;
    line-height: 2px;
  }

  .ProseMirror ul, .ProseMirror ol {
    padding-left: 30px;
  }

  .ProseMirror blockquote {
    padding-left: 1em;
    border-left: 3px solid #eee;
    margin-left: 0;
    margin-right: 0;
  }

  .ProseMirror-example-setup-style img {
    cursor: default;
  }

  .ProseMirror p {
    margin-top: 1em;
  }

  // Prevent first paragraph to stetch the input
  .ProseMirror p:first-child {
    margin: 0px;
  }

  .ProseMirror p:first-child + * {
    margin-top: 1em;
  }

  .ProsemirrorEditor {
    position: relative;
    .ProseMirror {
      padding-right: 12px !important;
    }
  }

  .ProsemirrorEditor img {
    max-width: 100%;
  }

  .ProseMirror h1:first-child,
  .ProseMirror h2:first-child,
  .ProseMirror h3:first-child,
  .ProseMirror h4:first-child,
  .ProseMirror h5:first-child,
  .ProseMirror h6:first-child {
    margin-top: 10px;
  }

  .ProseMirror [data-mention] {
    color: @info
  }

  .ProseMirror {
    //line-height: 1.2;
    outline: none;
  }

  .ProseMirror [data-oembed] {
    font-size: 0;
  }

  .ProseMirror iframe {
    pointer-events: none;
    display: block;
  }

  .ProseMirror p {
    margin-bottom: 1em
  }

  .ProseMirror-textblock-dropdown {
    min-width: 3em;
  }

  .ProseMirror .placeholder {
    padding: 0px !important;
    pointer-events: none;
    height: 0;
  }

  .ProseMirror:focus .placeholder {
    display: none;
  }

  .ProseMirror .tableWrapper {
    overflow-x: auto;
  }

  .ProseMirror .column-resize-handle {
    position: absolute;
    right: -2px;
    top: 0;
    bottom: 0;
    width: 4px;
    z-index: 20;
    background-color: #adf;
    pointer-events: none;
  }

  .ProseMirror.resize-cursor {
    cursor: ew-resize;
    cursor: col-resize;
  }

  /* Give selected cells a blue overlay */
  .ProseMirror .selectedCell:after {
    z-index: 2;
    position: absolute;
    content: "";
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(200, 200, 255, 0.4);
    pointer-events: none;
  }

  .ProseMirror-menubar-wrapper {
    position:relative;
    outline: none;
  }
  .ProseMirror table {
    margin: 0;
  }

  .ProseMirror .tableWrapper {
    margin: 1em 0;
  }
}

.ProseMirror-prompt {
  background: white;
  padding: 5px 10px 5px 15px;
  border: 1px solid silver;
  position: fixed;
  border-radius: 3px;
  min-width: 300px;
  z-index: 999999;
  box-shadow: -.5px 2px 5px rgba(0, 0, 0, .2);

  h5 {
    font-weight: bold;
    font-size: 100%;
    margin: 15px 0;
  }

  input {
    margin-bottom: 5px;
  }
}

.ProseMirror-prompt-close {
  position: absolute;
  left: 2px;
  top: 1px;
  color: #666;
  border: none;
  background: transparent;
  padding: 0;
}

.ProseMirror-prompt-close:after {
  content: "✕";
  font-size: 12px;
}

.ProseMirror-invalid {
  background: #ffc;
  border: 1px solid #cc7;
  border-radius: 4px;
  padding: 5px 10px;
  position: absolute;
  min-width: 10em;
}

.ProseMirror-prompt-buttons {
  margin: 15px 0;
  text-align: center;
}

.atwho-view .cur {
  border-left: 3px solid #59d6e4;
  background-color: #f7f7f7 !important;
}

.atwho-user,
.atwho-space,
.atwho-input a {
  color: #59d6e4;
}

.atwho-input a:hover {
  color: #59d6e4;
}

.atwho-view strong {
  background-color: #f9f0d2;
}

.atwho-view .cur strong {
  background-color: #f9f0d2;
}

[data-emoji-category] {
  max-height: 200px;
  display: block;
  position: relative;
  overflow: auto;

  .atwho-emoji-entry {
    width:24px;
    height:28px;
    overflow:hidden;
  }

  .atwho-emoji-entry.cur {
    background-color: #ededed  !important;
  }
}

.emoji-nav {
  padding-top:10px;
  .emoji-nav-item {
    border-top:2px solid @background-color-highlight;
  }

  .emoji-nav-item.cur {
    border-left:0px;
    border-top:2px solid @info;
  }
}

@media screen and (max-width: 768px) {
  .ProseMirror-menubar {
    margin-top: -45px;
  }
}